/*
 * Copyright 2010 David de Mingo
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package org.shalma.internal;

import java.util.ArrayList;

import org.shalma.model.Accountability;
import org.shalma.model.Document;
import org.shalma.model.Entity;
import org.shalma.model.Group;
import org.shalma.model.Party;
import org.shalma.model.Person;
import org.shalma.model.Property;

public class EntityRegistry {

	private ArrayList<Class<? extends Entity>> entities;

	private ArrayList<Class<? extends Property<?>>> properties;

	public static EntityRegistry instance = new EntityRegistry();

	private EntityRegistry() {
	}

	public ArrayList<Class<? extends Entity>> getEntities() {

		if (entities == null) {
			entities = new ArrayList<Class<? extends Entity>>();
			entities.add(Accountability.class);
			entities.add(Document.class);
			entities.add(Group.class);
			entities.add(Party.class);
			entities.add(Person.class);
		}

		return entities;
	}

	public ArrayList<Class<? extends Property<?>>> getProperties() {

		if (properties == null) {
			properties = new ArrayList<Class<? extends Property<?>>>();
			// properties.add((Class<? extends Property<?>>) Key.class);
		}

		return properties;
	}
}
